import request from '@/utils/request'

// 人气推荐列表
export const fetchHotProductList = (params) => {
    return request({
        url: '/home/recommendProduct/list',
        method: 'get',
        params: params
    })
}

// 更新人气推荐状态
export const updateHotProductStatus = (data) => {
    return request({
        url: '/home/recommendProduct/update/recommendStatus',
        method: 'post',
        data: data
    })
}

// 删除人气推荐
export const deleteHotProduct = (data) => {
    return request({
        url: '/home/recommendProduct/delete',
        method: 'post',
        data: data
    })
}

// 创建人气推荐
export const createHotProduct = (data) => {
    return request({
        url: '/home/recommendProduct/create',
        method: 'post',
        data: data
    })
}

// 更新专题排序
export const updateHotProductSort = (params) => {
    return request({
        url: '/home/recommendProduct/update/sort/' + params.id,
        method: 'post',
        params: params
    })
}